-- GENERATED SPELL FOR [Illidari Blood Lord] --


function spell0_23397(pUnit, Event) --@Divine Shield,Self--
pUnit:FullCastSpellOnTarget(41367,pUnit)
pUnit:RegisterEvent('Sorts_23397', 15278, 1)
end

function spell1_23397(pUnit, Event) --@Hammer of Justice,n/a--
pUnit:FullCastSpellOnTarget(13005,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23397', 6302, 1)
end

function spell2_23397(pUnit, Event) --@Judgement of Command,n/a--
pUnit:FullCastSpellOnTarget(41368,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23397', 596, 1)
end

function Sorts_23397(pUnit, Event)
local choix_sorts_23397 = math.random(0, 2)
if choix_sorts_23397 == 0 then
pUnit:RegisterEvent('spell0_23397', 1, 1)
end
if choix_sorts_23397 == 1 then
pUnit:RegisterEvent('spell1_23397', 1, 1)
end
if choix_sorts_23397 == 2 then
pUnit:RegisterEvent('spell2_23397', 1, 1)
end
end

function mob23397_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23397', math.random(1500, 3000), 1)
end

function mob23397_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23397_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23397_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23397, 1, 'mob23397_Action')
RegisterUnitEvent(23397, 2, 'mob23397_Leave')
RegisterUnitEvent(23397, 3, 'mob23397_Kill')
RegisterUnitEvent(23397, 4, 'mob23397_Die')
